<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="csrf-token" content="{{ csrf_token() }}">
<title></title>
 <link rel="stylesheet" href="/css_system/common.css" />
 <link rel="stylesheet" href="/css_system/main.css" />
 <link href="/js_system/jQueryUI/jquery-ui.css" rel="stylesheet">
    <!-- 编辑器 -->
<script type="text/javascript" src="/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="/ckfinder/ckfinder.js"></script>
 <!-- 对话框 -->
<link rel="stylesheet" href="/js_system/easydialog/easydialog.css" />
<script type="text/javascript" src="/js_system/easydialog/easydialog.js"></script>
<script type="text/javascript" src="/js_system/cueeasy.js"></script>
<script type="text/javascript" src="/js_system/jquery.min.js"></script>

 <!-- 上传图片 -->
<script type="text/javascript" src="/uploadify/jquery.uploadify.js" ></script>
<link rel="stylesheet" type="text/css" href="/uploadify/uploadify.css">
<script type="text/javascript" src="/js_system/mindshare.js"></script>
</head>
    <body>
  <div class="container">
            <div class="location clearfix">
                     <div class="here_area fl"><strong>当前位置：</strong>APP管理&nbsp;&nbsp;&raquo;&nbsp;&nbsp;修改自学习社群</div>
                <div class="here_btn fr">
                    <a href="javascript:history.back()" class="btn btn_back">返回</a>
                    <a href="javascript:;" onclick="location.replace(location.href);" class="btn btn_refresh">刷新</a>
                </div>
            </div>
            <div id="tabs">
                <ul>
                    <li><a href="#tabs-1">基本信息</a></li>
                    <li><a href="#tabs-2">图片管理</a></li>
                    <li><a href="#tabs-3">详细内容</a></li>
                </ul>
                <form action="/admin_system/mindshare/indexedit/{{$entMindShare->MinSgaID}}" method="post">
                    <div id="tabs-1">
                        @include('common.errors')
                        <table class="dataTable">
                            <input type="hidden" name="_token" value="<?php echo csrf_token(); ?>">
                            <tbody>

                            <tr>
                                <td class="ltd">书籍名称</td>
                                <td class="rtd">
                                    <input id="txtMinSgaTitle" value="{{$entMindShare->MinSgaTitle}}" class="input-text" type="text" name="txtMinSgaTitle" />
                                    <span class="text-red pl10">*必填</span>
                                </td>
                            </tr>
                            <tr>
                                <td class="ltd">简介</td>
                                <td class="rtd">
                                    <textarea style="width: 500px;" class="textarea" id="txtMinSgaDesc" cols="20" rows="8" name="txtMinSgaDesc">{{$entMindShare->MinSgaDesc}}</textarea>
                                </td>
                            </tr>
                            <tr>
                                <td class="ltd">显示 / 隐藏</td>
                                <td class="rtd">
                                    <span class="Radio">
                                       <?php $IsShow=$entMindShare->IsShow;?>
                                        <input id="RadIsShow1"  type="radio" value="1" <?php if($IsShow==1){ echo 'checked="checked"';}  ?>  name="RadIsShow" /><label for="RadIsShow1">显示</label>
                                        <input id="RadIsShow0" type="radio" value="0" <?php if($IsShow==0){ echo 'checked="checked"';} ?>  name="RadIsShow" /><label for="RadIsShow0">隐藏</label>
                                     </span>
                                </td>
                            </tr>

                            </tbody>

                        </table>
                    </div>
                    <div id="tabs-2">
                        <table class="dataTable">
                            <tbody>
                            <tr>
                                <td class="ltd">列表图片(5:2)<br/></td>
                                <td class="rtd">
                                    <div class="PreviewImg">
                                        <div id="PreviewImgs"
                                             style="padding:0px; background:#fff url(/images_system/yulan.gif) no-repeat center;"
                                             class="PreviewTD delfile_1">
                                            @if($entMindShare->FilePath1!='')<a target="_blank" href="{{$entMindShare->FilePath1}}"><img src="{{$entMindShare->FilePath1}}"></a>@endif
                                        </div>
                                    </div>
                                    <input type="hidden" id="File_1" value="{{$entMindShare->FilePath1}}" name="File_1">

                                    <input id="file_upload" name="file_upload" type="file">

                                    @if($entMindShare->FilePath1=='')
                                        <a id="addvideoFile_1" style="font-weight:normal;color:#FFF; " class="button button-primary"
                                           href="javascript:$('#file_upload').uploadify('upload','*');">上传</a>
                                        <a id="delvideoFile_1" style="font-weight:normal;color:#FFF; display: none;" onclick="delFile(1);" class="button button-primary"
                                           href="javascript:void(0);">删除</a>
                                        @else
                                        <a id="addvideoFile_1" style="font-weight:normal;color:#FFF; display: none;" class="button button-primary"
                                           href="javascript:$('#file_upload').uploadify('upload','*');">上传</a>
                                        <a id="delvideoFile_1" style="font-weight:normal;color:#FFF; " onclick="delFile(1);" class="button button-primary"
                                           href="javascript:void(0);">删除</a>
                                        @endif


                                    <script type="text/javascript">
                                        <?php $timestamp = time();?>
                                        $(function () {
                                            $('#file_upload').uploadify({
                                                'buttonText': "请选择文件",
                                                'fileTypeExts': '*.jpg;*.gif;*.png;*.jpeg',
                                                'auto': false,
                                                'formData': {
                                                    'timestamp': '<?php echo $timestamp;?>',
                                                    'token': '<?php echo md5('unique_salt' . $timestamp);?>'
                                                },
                                                'swf': '/uploadify/uploadify.swf',
                                                'uploader': '/uploadify/uploadify.php',
                                                'onUploadSuccess': function (file, data, response) {
                                                    if (data != '') {
                                                        $('#File_1').val(data);
                                                        $('#addvideoFile_1').hide();
                                                        $('#delvideoFile_1').show();
                                                        $('#PreviewImgs').html('<a target="_blank" href=' + data + '><img src=' + data + '></a>');
                                                    }
                                                }
                                            });
                                        });
                                    </script>

                                </td>
                            </tr>

                            </tbody>
                        </table>
                    </div>

                    <div id="tabs-3">
                        <table class="dataTable">
                            <tbody>
                            <tr>
                                <td class="ltd">详细内容</td>
                                <td class="rtd">
                                    <textarea id="txtAreaCkeditor" name="txtAreaCkeditor"  rows="20" cols="8" class="ckeditor" ><?php echo html_entity_decode($entMindShare->ShareContents);?></textarea>
                                    <script>
                                        CKEDITOR.replace('txtAreaCkeditor',{width:500});
                                    </script>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>

                    <div class="contBtn">
                        <table class="dataTable">
                            <tfoot>
                            <tr>
                                <td class="ltd"></td>
                                <td class="rtd">
                                    <input id="btnAddFrom" onclick="return CheckindexFrom();" type="submit" class="btn btn_save"  name="btnFrom" value="保存" >
                                </td>
                            </tr>
                            </tfoot>
                        </table>
                    </div>
                </form> 
            </div>
        </div>
    <script src="/js_system/jQueryUI/jquery-ui.js"></script>
    <script src="/js_system/jqueryui.js"></script>
    </body>
</html>